package com.itheima.autoconfig;

import com.aliyun.oss.OSS;
import com.aliyun.oss.OSSClient;
import com.aliyun.oss.OSSClientBuilder;
import com.baidu.aip.face.AipFace;
import com.easemob.im.server.api.message.send.SendMessage;

import com.itheima.configproperties.FaceProperties;
import com.itheima.configproperties.HuanXinProperties;
import com.itheima.configproperties.Imgproperties;
import com.itheima.configproperties.SmsProperties;
import com.itheima.template.CheckFaceTemplate;
import com.itheima.template.HuanXinTemplate;
import com.itheima.template.PushImgTemplate;
import com.itheima.template.SednMsgTemplate;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author：wsm
 * @Date：2021/12/19/19:50
 * @Description：
 */
@EnableConfigurationProperties({SmsProperties.class,Imgproperties.class,FaceProperties.class, HuanXinProperties.class})
public class TanhuaAutoConfiguration {
    @Bean
    public SednMsgTemplate smsTemplate(SmsProperties smsProperties) {
        return new SednMsgTemplate (smsProperties);
    }
    @Bean
    public PushImgTemplate pushImgTemplate(Imgproperties imgproperties){return new PushImgTemplate(imgproperties);}
    @Bean
    public AipFace getclient(FaceProperties faceProperties){
        AipFace client = new AipFace(faceProperties.getAPP_ID(),faceProperties.getAPI_KEY() ,faceProperties.getSECRET_KEY());
        return client;
    }
    @Bean
    public CheckFaceTemplate checkFaceTemplate(){return new CheckFaceTemplate();}
    @Bean
    public HuanXinTemplate huanXinTemplate(HuanXinProperties properties) {
        return new HuanXinTemplate(properties);
    }


}
